package com.betterwood.dragon.enums;

/**
 * @author zhengyanhua
 * @create 2021-03-19 16:30
 */
public enum UserFilightRecodeUserStatusEnum {

    LOGIN("扫码进入休息室",0),
    SETUSERINFO("后台维护资料完成",1),
    LONGOUT("离开",2);

    private String name;

    private Integer value;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getValue() {
        return value;
    }

    public void setValue(Integer value) {
        this.value = value;
    }

    UserFilightRecodeUserStatusEnum(String name, Integer value) {
        this.name = name;
        this.value = value;
    }

    //枚举方法
    public static String getYsOrderStatusEnumName(int index){
        for(UserFilightRecodeUserStatusEnum c : UserFilightRecodeUserStatusEnum.values()){
            if(c.getValue()==index){
                return c.getName();
            }
        }
        return null;
    }


    //枚举方法
    public static int getYsOrderStatusEnumIndex(String name){
        for(UserFilightRecodeUserStatusEnum c : UserFilightRecodeUserStatusEnum.values()){
            if(c.getName().equals(name)){
                return c.getValue();
            }
        }
        return -1;
    }
}
